Tester: _DISPLAY and _AUTODISPLAY

Charlie Veniot 21st October 2022 at 6:58pm
COLOR 15
PRINT "Press any key and let's see what the default"
PRINT "(i.e. _autodisplay) does printing 'hello world!'"
PRINT "in a for-next loop of 1 to 100:"
a$ = INPUT$(1)
COLOR 15
FOR i = 1 TO 100
  PRINT "hello world! ";
NEXT i

COLOR 14
PRINT : PRINT
PRINT "Press any key and let's see what _display does"
PRINT "(turns off _autodisplay) after each print of 'hello world!'"
PRINT "in a for-next loop of 1 to 100:"
a$ = INPUT$(1)
FOR i = 1 TO 100
  PRINT "hello world! ";
  _DISPLAY
NEXT i

COLOR 13
_AUTODISPLAY
PRINT : PRINT
PRINT "Press any key and let's see what _autodisplay does"
PRINT "(turn _autodisplay back on) printing 'hello world!', again,"
PRINT "in a for-next loop of 1 to 100:"
a$ = INPUT$(1)
FOR i = 1 TO 100
  PRINT "hello world! ";
NEXT i

COLOR 12
PRINT : PRINT
PRINT "Press any key and let's see what _display does"
PRINT "just before doing the same printing (without _display in the loop),"
PRINT "followed by a _autodisplay after the loop:"
_DISPLAY
a$ = INPUT$(1)
FOR i = 1 TO 100
  PRINT "hello world! ";
NEXT i
_ALERT("The print statements have happened, but they will not show on the screen until you close this window and let the program do a _autodisplay.")
_AUTODISPLAY

COLOR 15
PRINT : PRINT
PRINT "Press any key to end the program"
a$ = INPUT$(1)
END